package com.woniuxy;

import com.woniuxy.pojo.Category;
import com.woniuxy.service.CategoryService;
import com.woniuxy.service.impl.CategoryServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        CategoryService categoryServiceImpl = applicationContext.getBean("categoryServiceImpl", CategoryService.class);
        Category one = categoryServiceImpl.findOne(1);
        System.out.println(one.toString());
            }


}
